#pragma once


#include<deque>

namespace bit
{
	template<class T,class Container=deque<T>>
	class queue
	{
	public:
		size_t size()
		{
			return _con.size();
		}
		T& front()
		{
			return _con.front();
		}
		T& back()
		{
			return _con.back();
		}
		const T& front() const
		{
			return _con.front();
		}
		const T& back() const
		{
			return _con.back();
		}
		void push(const T& val)
		{
			_con.push_back(val);
		}
		void pop()
		{
			_con.pop_front();
		}
	private:
		Container _con;
	};
	void queue_test()
	{
		queue<int> q;
		q.push(1);
		q.push(2);
		while (q.size())
		{
			cout << q.back();
			cout << q.front() << " ";
			q.pop();
		}
	}
}